//
// NeL - bindings
// Copyright (C) 2010 Naush
//
//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU Affero General Public License as
//published by the Free Software Foundation, either version 3 of the
//License, or (at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU Affero General Public License for more details.
//
//You should have received a copy of the GNU Affero General Public License
//along with this program.  If not, see <http://www.gnu.org/licenses/>.
package org.ryzom.nel.misc;

public class CStringStream extends CMemStream {
  private long swigCPtr;

  public CStringStream(long cPtr, boolean cMemoryOwn) {
    super(nelmiscJNI.CStringStream_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  public static long getCPtr(CStringStream obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nelmiscJNI.delete_CStringStream(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public CStringStream assign(CStringStream other) {
    return new CStringStream(nelmiscJNI.CStringStream_assign(swigCPtr, this, CStringStream.getCPtr(other), other), false);
  }

  public void serialBit(SWIGTYPE_p_bool bit) {
    nelmiscJNI.CStringStream_serialBit(swigCPtr, this, SWIGTYPE_p_bool.getCPtr(bit));
  }

  public void serial(SWIGTYPE_p_unsigned_char b) {
    nelmiscJNI.CStringStream_serial__SWIG_6(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(b));
  }
/*
  public void serial(SWIGTYPE_p_char b) {
    nelmiscJNI.CStringStream_serial__SWIG_7(swigCPtr, this, SWIGTYPE_p_char.getCPtr(b));
  }

  public void serial(SWIGTYPE_p_unsigned_int b) {
    nelmiscJNI.CStringStream_serial__SWIG_8(swigCPtr, this, SWIGTYPE_p_unsigned_int.getCPtr(b));
  }

  public void serial(SWIGTYPE_p_int b) {
    nelmiscJNI.CStringStream_serial__SWIG_9(swigCPtr, this, SWIGTYPE_p_int.getCPtr(b));
  }*/

  public void serial(SWIGTYPE_p_unsigned_int b) {
    nelmiscJNI.CStringStream_serial__SWIG_10(swigCPtr, this, SWIGTYPE_p_unsigned_int.getCPtr(b));
  }

  public void serial(SWIGTYPE_p_int b) {
    nelmiscJNI.CStringStream_serial__SWIG_11(swigCPtr, this, SWIGTYPE_p_int.getCPtr(b));
  }

  public void serial(SWIGTYPE_p_unsigned_long_long b) {
    nelmiscJNI.CStringStream_serial__SWIG_12(swigCPtr, this, SWIGTYPE_p_unsigned_long_long.getCPtr(b));
  }

  public void serial(SWIGTYPE_p_long_long b) {
    nelmiscJNI.CStringStream_serial__SWIG_13(swigCPtr, this, SWIGTYPE_p_long_long.getCPtr(b));
  }

  public void serial(SWIGTYPE_p_float b) {
    nelmiscJNI.CStringStream_serial__SWIG_14(swigCPtr, this, SWIGTYPE_p_float.getCPtr(b));
  }

  public void serial(SWIGTYPE_p_double b) {
    nelmiscJNI.CStringStream_serial__SWIG_15(swigCPtr, this, SWIGTYPE_p_double.getCPtr(b));
  }

  public void serial(SWIGTYPE_p_bool b) {
    nelmiscJNI.CStringStream_serial__SWIG_16(swigCPtr, this, SWIGTYPE_p_bool.getCPtr(b));
  }

  public void serial(SWIGTYPE_p_char b) {
    nelmiscJNI.CStringStream_serial__SWIG_17(swigCPtr, this, SWIGTYPE_p_char.getCPtr(b));
  }

  public void serial(SWIGTYPE_p_std__string b) {
    nelmiscJNI.CStringStream_serial__SWIG_18(swigCPtr, this, SWIGTYPE_p_std__string.getCPtr(b));
  }

  public void serial(ucstring b) {
    nelmiscJNI.CStringStream_serial__SWIG_19(swigCPtr, this, ucstring.getCPtr(b), b);
  }

  public void serialCont(SWIGTYPE_p_std__vectorT_unsigned_char_t cont) {
    nelmiscJNI.CStringStream_serialCont__SWIG_7(swigCPtr, this, SWIGTYPE_p_std__vectorT_unsigned_char_t.getCPtr(cont));
  }

  public void serialCont(SWIGTYPE_p_std__vectorT_char_t cont) {
    nelmiscJNI.CStringStream_serialCont__SWIG_8(swigCPtr, this, SWIGTYPE_p_std__vectorT_char_t.getCPtr(cont));
  }

  public void serialCont(SWIGTYPE_p_std__vectorT_bool_t cont) {
    nelmiscJNI.CStringStream_serialCont__SWIG_9(swigCPtr, this, SWIGTYPE_p_std__vectorT_bool_t.getCPtr(cont));
  }

  public void serialHex(SWIGTYPE_p_unsigned_int b) {
    nelmiscJNI.CStringStream_serialHex(swigCPtr, this, SWIGTYPE_p_unsigned_int.getCPtr(b));
  }

}
